<<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="org.apache.log4j.Logger"%>
<%@ page import="log.HelloWorld" %>

<%

    Logger log = Logger.getLogger("log.HelloWorld");
    HelloWorld h=new HelloWorld();

    //response.setCharacterEncoding("utf-8");
%>
<%
    String error=request.getParameter("error");
    h.error(error);
%>
<html>
<head>
    <title>Log4j-靶机</title>
</head>
<body>
<%="error="+error %>
<form action="index.jsp" method="get">
error=<input type="text" name="error" >
    <input type="submit" name="submit" value="输出日志" \>
</form>

</body>
</html>
